package com.joe.codemother.entity.enums;

/**
 * 消息类型枚举
 */
public enum MessageTypeEnum {

	USER("user"),
	AI("ai"),
	ERROR("error");

	private final String value;

	MessageTypeEnum(String value) {
		this.value = value;
	}

	public String getValue() {
		return value;
	}

	public static boolean isValid(String value) {
		if (value == null) {
			return false;
		}
		for (MessageTypeEnum type : values()) {
			if (type.value.equals(value)) {
				return true;
			}
		}
		return false;
	}
} 